home *** CD-ROM | disk | FTP | other *** search
- Procedure ScrAtt (AttCode: Integer);
-
- {╔════════════════════════════════════════╗
- ║ ║
- ║ -- For IBM Monochrome Display -- ║
- ║ ║
- ║ Takes an integer value of 1 to 11 ║
- ║ and sets the character attribute ║
- ║ to one of the following... ║
- ║ ║
- ║ 1 - Underlined - Dim - Blinking ║
- ║ 2 - Underlined - Dim ║
- ║ 3 - Underlined - Bright - Blinking ║
- ║ 4 - Underlined - Bright ║
- ║ 5 - Reverse video - Blinking ║
- ║ 6 - Reverse video ║
- ║ 7 - Normal - Dim - Blinking ║
- ║ 8 - Normal - Dim ║
- ║ 9 - Normal - High - Blinking ║
- ║ 10 - Normal - High ║
- ║ 11 - Invisible character ║
- ║ ║
- ║ e.g. ScrAtt(8); ║
- ║ ║
- ║ ║
- ║ Written by: John Tevik ║
- ║ 5120 Oakley ║
- ║ Duluth, MN 55804 ║
- ║ ║
- ╚════════════════════════════════════════╝}
-
- Var
- B, C: 1..9;
- Flash: Boolean;
-
- Begin {ScrAtt}
- If (AttCode In [1,3,5,7,9]) Then
- Flash := True
- Else
- Flash := False;
- If (AttCode In [5,6]) Then
- B := 15
- Else If (AttCode = 11) Then
- B := 8
- Else
- B := 9;
- Case AttCode Of
- 1,2 : C := 1;
- 3,4 : C := 9;
- 5,6,11 : C := 8;
- 7,8 : C := 7;
- 9,10 : C := 10
- End;
- If Flash Then
- Begin
- TextColor (C + Blink);
- TextBackground (B)
- End
- Else
- begin
- TextColor (C);
- TextBackground (B)
- End
- End; {scratt}